@extends('admin')

@section('content')
    <p class="mb10">
        <a href="{{url('admin/rbac/editrole/')}}" class="btn J_dialog" title="新增角色"><span class="add"></span>发布</a>
    </p>
    <div class="h_a">搜索</div>
    <div class="search_type cc mb10">
        <form action="{{url('admin/rbac')}}" method="get" class="search_form">
            <label for="search_title">标题：</label><input type="text" name="name" value="" id="search_title" class="input length_2 mr10"/>
            <button type="submit" class="btn">提交查询</button>
        </form>
    </div>
    <div class="table_list">
        <div id="data_list">
            <table class="items">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>标识</th>
                    <th>名称</th>
                    <th>权限</th>
                    <th>发布时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {{count($items)}}
                @if( count($items) )
                    @foreach ($items as $item)
                        <tr>
                            <td>{{$item->id}}</td>
                            <td>{{$item->name}}</td>
                            <td>{{$item->display_name}}</td>
                            <td></td>
                            <td>{{$item->created_at}}</td>
                            <td>
                                <a href="{{url('admin/rbac/editrole/'.$item->id)}}" title="编辑 {{$item->name}}" class="mr10 J_dialog">[编辑]</a>
                                <a href="{{url('admin/rbac/editrole/'.$item->id)}}" class="mr10 J_ajax_del">[删除]</a>
                            </td>
                        </tr>
                    @endforeach
                @endif
                </tbody>
            </table>
        </div>

        <div class="summary">
            共有 {{$items->total()}} 条数据
        </div>
        @if ($items->hasPages())
            <div class="pager">
                {!! $items->appends($appends)->render() !!}
            </div>
        @endif
    </div>

@stop